#include <stdio.h>
#include <string.h>
#include "utils.h"

void swap(unsigned char **s1ptr, unsigned char **s2ptr) {
	unsigned char *temp;
	temp = *s1ptr;
	*s1ptr = *s2ptr;
	*s2ptr = temp;
}

void bubblesort(unsigned char **sArray, int arraysize) {
	int pass, j;
	for (pass = (arraysize - 1); pass > 0; --pass)
		for (j = 1; j <= pass; j++)
			if (comparar(sArray[j - 1], sArray[j])>0)
				swap(&sArray[j-1], &sArray[j]);

}
